#!/bin/bash

hg clone http://platonica.ru/hg platonica
#hg clone /home/lucky/public_html/platonica platonica
PV="1.1rc"


(
cd platonica
rm -f codeguides.txt hgup.php
rm -rf .hg* tests 
rm -rf ./updates/${PV}/
)

tar -czf platonica-${PV}.tar.gz platonica
zip -r platonica-${PV}.zip platonica


exit

mkdir -p patch/platonica
(
cd patch/platonica
cp -R ../../platonica/admin .
cp -R ../../platonica/updates .
mkdir lib
cp -R ../../platonica/lib/tpl ./lib/
cp -R ../../tip/files ./updates/${PV}/
)

(
cd patch
tar -czf platonica-patch-v1.0rc-${PV}.tar.gz platonica
zip -r platonica-patch-v1.0rc-${PV}.zip platonica
)

mv patch/platonica-patch-* .


